package cn.hchaojie.javase.day07;

import org.junit.Test;

/**
 * 多线程
 * 
 * @author hchaojie
 *
 */
public class TestThread {
	@Test
	public void test1() {
		System.out.println("1");
		

		Thread thread = new Thread(new PrintTask());
		thread.start();		// 启动线程
		
//		System.err.println("a");
//		System.err.println("b");
//		System.err.println("c");
	
		
		System.out.println("2");
		System.out.println("3");
	}
}

class PrintTask implements Runnable {
	@Override
	public void run() {
		System.err.println("a");
		System.err.println("b");
		System.err.println("c");
	}
}
